/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Classes;

import java.util.ArrayList;
import java.util.Objects;


/**
 * Représente un restaurant
 * @author userinsta
 */
public class Restaurant{
    
    private Adresse _adresse;
    private String _nom;
    private Stock _stock;
    private Immobilisations _immobilisations;
    private Achats _achats;
    private Ventes _ventes;
    private Reservations _reservations;
    private ArrayList<Salarie> _salaries;
    private ArrayList<IObserver> _observer;
    /**
     * Constructors
     */
    public Restaurant(){
        this.setSalaries(new ArrayList());
        this._observer = new ArrayList();
    }

    public Restaurant(Adresse adresse, String nom, Stock stock, Immobilisations immobilisations, Achats achats, Ventes ventes, Reservations reservations, ArrayList<Salarie> salaries) {
        this.setAdresse(adresse);
        this.setNom(nom);
        this.setStock(stock);
        this.setImmobilisations(immobilisations);
        this.setAchats(achats);
        this.setVentes(ventes);
        this.setReservations(reservations);
        this.setSalaries(salaries);
    }
    /**
     * Getters and setters
     */
    public Adresse getAdresse() {
        return _adresse;
    }

    public void setAdresse(Adresse adresse) {
        this._adresse = adresse;
    }

    public String getNom() {
        return _nom;
    }

    public void setNom(String nom) {
        this._nom = nom;
    }

    public Stock getStock() {
        return _stock;
    }

    public void setStock(Stock stock) {
        this._stock = stock;
    }

    public Immobilisations getImmobilisations() {
        return _immobilisations;
    }

    public void setImmobilisations(Immobilisations immobilisations) {
        this._immobilisations = immobilisations;
    }

    public Achats getAchats() {
        return _achats;
    }

    public void setAchats(Achats achats) {
        this._achats = achats;
    }

    public Ventes getVentes() {
        return _ventes;
    }

    public void setVentes(Ventes ventes) {
        this._ventes = ventes;
    }

    public Reservations getReservations() {
        return _reservations;
    }

    public void setReservations(Reservations reservations) {
        this._reservations = reservations;
    }

    public ArrayList<Salarie> getSalaries() {
        return _salaries;
    }

    public void setSalaries(ArrayList<Salarie> salaries) {
        this._salaries = salaries;
    }
    /**
     * Equals
     * @param obj
     * @return true si equals 
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Restaurant other = (Restaurant) obj;
        if (!Objects.equals(this._adresse, other._adresse)) {
            return false;
        }
        if (!Objects.equals(this._nom, other._nom)) {
            return false;
        }
        if (!Objects.equals(this._stock, other._stock)) {
            return false;
        }
        if (!Objects.equals(this._immobilisations, other._immobilisations)) {
            return false;
        }
        if (!Objects.equals(this._achats, other._achats)) {
            return false;
        }
        if (!Objects.equals(this._ventes, other._ventes)) {
            return false;
        }
        if (!Objects.equals(this._reservations, other._reservations)) {
            return false;
        }
        if (!Objects.equals(this._salaries, other._salaries)) {
            return false;
        }
        return true;
    }
}